package com.wantup.service.impl;

import com.wantup.entity.TblUser;
import com.wantup.mapper.TblUserMApper;
import com.wantup.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author Zhaoluowei
 * @version 1.0
 * @date 2019/6/18 11:52
 */

@Service(value = "userService")
public class UserServiceImpl implements UserService {

    @Autowired
    private TblUserMApper tblUserMApper;

    @Override
    public List<TblUser> findAllService() {
        System.out.println("查询所有用户 信息");
        List<TblUser> tblUsers = tblUserMApper.findAll();

        return tblUsers;
    }

    @Override
    @Transactional
    public int saveUesrInfoService(TblUser tblUser) {
        System.out.println("保存所有用户 信息");
        return 0;
    }
}
